package com.ruiysoft.crm.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * 预约客户
 *
 * @author fanyl
 * @date 2019-04-14 12:55:15
 */
@Data
@Accessors(chain = true)
@TableName(value = "biz_booking_client")
public class BizBookingClient extends Model<BizBookingClient> {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField(value = "clientId", exist = true)
    private Integer clientId;//客户ID

    /**
     * 车牌号
     */
    @TableField(value = "car_no", exist = false)
    private String carNo;
    /**
     * 车主姓名
     */
    @TableField(value = "car_owner", exist = true)
    private String carOwner;
    /**
     * 联系电话
     */
    @TableField(value = "mobile", exist = true)
    private String mobile;
    /**
     * 车险到期日
     */
    @TableField(value = "car_insurance_deadline", exist = true)
    private Date carInsuranceDeadline;
    /**
     * 分配人员
     */
    @TableField(value = "user_name", exist = true)
    private String userName;
    /**
     * 业务员Id
     */
    @TableField(value = "user_id", exist = true)
    private Integer userId;
    /**
     * 外呼次数
     */
    @TableField(value = "call_out_count", exist = true)
    private Integer callOutCount;
    /**
     * 客户级别 A B C
     */
    @TableField(value = "client_level", exist = true)
    private String clientLevel;
    /**
     * 跟进状态
     * 0 失败
     * 2 已联系
     * 3 第一次无人接听
     * 4 第二次无人接听
     * 5 第三次无人接听
     * 6 第四次无人接听
     */
    @TableField(value = "follow_status", exist = true)
    private String followStatus;

    /**
     * 跟进状态
     * 0 未读
     * 1 已读
     */
    @TableField(value = "read_status", exist = true)
    private String readStatus;

    /**
     * 预约状态描述
     */
    @TableField(exist = false)
    private String bookingStatus;

    /**
     * 预约时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "booking_time", exist = true)
    private LocalDateTime bookingTime;
    /**
     * 备注
     */
    @TableField(value = "remark", exist = true)
    private String remark;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "create_date", exist = true)
    private LocalDateTime createDate;
    /**
     * 修改时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "modification_date", exist = true)
    private LocalDateTime modificationDate;
}